

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Learn on the Fly embedding scheme &mdash; quippy 7ea04c5+ documentation</title>
  

  
  
    <link rel="shortcut icon" href="_static/favicon.ico"/>
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "math|output_area", "processEscapes": true, "ignoreClass": "document", "inlineMath": [["$", "$"], ["\\(", "\\)"]]}})</script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> quippy
          

          
            
            <img src="_static/hybrid.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                7ea04c5+
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
    
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to <code class="docutils literal notranslate"><span class="pre">quippy</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation of QUIP and quippy</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="quippy.html">Quippy library reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quippy.html#core-functionality">Core functionality</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#structure-generation-manipulation-and-analysis">Structure generation, manipulation and analysis</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="quippy.html#molecular-dynamics">Molecular Dynamics</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="dynamicalsystem.html">Molecular Dynamics</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#"><cite>Learn on the Fly</cite> embedding scheme</a><ul class="simple">
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#additional-tools-for-potentials">Additional tools for Potentials</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#mathematical-and-optimisation-tools">Mathematical and optimisation tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#units-data-and-constants">Units, Data and Constants</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#low-level-routines-and-datatypes">Low level routines and datatypes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="visualisation.html">Visualisation Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="fortran_wrapper.html">Appendix: wrapping Fortran 90 Code</a></li>
<li class="toctree-l1"><a class="reference internal" href="teach_sparse.html">Command line options of the teach_sparse main program</a></li>
</ul>

            
          
    <p></p>
    <ul>
        <li><a href="genindex.html">Index</a></li>
        <li><a href="py-modindex.html">Module Index</a></li>
        <li><a href="search.html">Search Page</a></li>
        <li><a href="_modules/index.html">Module Source Code</a></li>
    </ul>
  
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">quippy</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
          <li><a href="quippy.html">Quippy library reference</a> &raquo;</li>
        
      <li><cite>Learn on the Fly</cite> embedding scheme</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/lotf.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  
<style>
/* CSS overrides for sphinx_rtd_theme */

/* 24px margin */
.nbinput.nblast,
.nboutput.nblast {
    margin-bottom: 19px;  /* padding has already 5px */
}

/* ... except between code cells! */
.nblast + .nbinput {
    margin-top: -19px;
}

.admonition > p:before {
    margin-right: 4px;  /* make room for the exclamation icon */
}

/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
    text-align: unset;
}
</style>
<div class="section" id="module-quippy.lotf">
<span id="learn-on-the-fly-embedding-scheme"></span><h1><cite>Learn on the Fly</cite> embedding scheme<a class="headerlink" href="#module-quippy.lotf" title="Permalink to this headline">¶</a></h1>
<p>Module containing <a class="reference internal" href="#quippy.lotf.LOTFDynamics" title="quippy.lotf.LOTFDynamics"><code class="xref py py-class docutils literal notranslate"><span class="pre">LOTFDynamics</span></code></a> integrator for doing ‘Learn on the Fly’
predictor-corrector dynamics within the ASE molecular dynamics framework.</p>
<p>Module contents for <a class="reference internal" href="#module-quippy.lotf" title="quippy.lotf: `Learn on the Fly` dynamics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quippy.lotf</span></code></a>:</p>
<p class="rubric">Classes</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics" title="quippy.lotf.LOTFDynamics"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LOTFDynamics</span></code></a>(atoms,&nbsp;timestep,&nbsp;extrapolate_steps)</td>
<td>‘Learn on the Fly’ dynamics with extrapolation and interpolation</td>
</tr>
</tbody>
</table>
<p class="rubric">Functions</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.lotf.update_hysteretic_qm_region" title="quippy.lotf.update_hysteretic_qm_region"><code class="xref py py-obj docutils literal notranslate"><span class="pre">update_hysteretic_qm_region</span></code></a>(atoms,&nbsp;…[,&nbsp;…])</td>
<td>Update the QM region in <cite>atoms</cite></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.lotf.iter_atom_centered_clusters" title="quippy.lotf.iter_atom_centered_clusters"><code class="xref py py-obj docutils literal notranslate"><span class="pre">iter_atom_centered_clusters</span></code></a>(at[,&nbsp;mark_name])</td>
<td>Iterate over all atom-centered (little) clusters in <cite>at</cite>.</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="quippy.lotf.LOTFDynamics">
<em class="property">class </em><code class="descclassname">quippy.lotf.</code><code class="descname">LOTFDynamics</code><span class="sig-paren">(</span><em>atoms</em>, <em>timestep</em>, <em>extrapolate_steps</em>, <em>trajectory=None</em>, <em>logfile=None</em>, <em>loginterval=1</em>, <em>check_force_error=False</em>, <em>qm_update_func=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics" title="Permalink to this definition">¶</a></dt>
<dd><p>‘Learn on the Fly’ dynamics with extrapolation and interpolation</p>
<p>Subclass of <code class="xref py py-class docutils literal notranslate"><span class="pre">ase.md.md.MolecularDynamics</span></code> which
implements LOTF predictor/corrector dynamics. See the <a class="reference internal" href="#quippy.lotf.LOTFDynamics.step" title="quippy.lotf.LOTFDynamics.step"><code class="xref py py-meth docutils literal notranslate"><span class="pre">step()</span></code></a>
method for a description of the algorithm.</p>
<p>The calculator associated with <cite>Atoms</cite> should be a
<a class="reference internal" href="potential.html#quippy.potential.Potential" title="quippy.potential.Potential"><code class="xref py py-class docutils literal notranslate"><span class="pre">quippy.potential.Potential</span></code></a> object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Attributes:</th><td class="field-body"><dl class="first last docutils">
<dt><a class="reference internal" href="#quippy.lotf.LOTFDynamics.extrapolate_steps" title="quippy.lotf.LOTFDynamics.extrapolate_steps"><code class="xref py py-obj docutils literal notranslate"><span class="pre">extrapolate_steps</span></code></a></dt>
<dd><p class="first last">Number of small time-steps used when extrapolating or interpolating in the LOTF predictor-corrector loop.</p>
</dd>
<dt><a class="reference internal" href="#quippy.lotf.LOTFDynamics.state_label" title="quippy.lotf.LOTFDynamics.state_label"><code class="xref py py-obj docutils literal notranslate"><span class="pre">state_label</span></code></a></dt>
<dd><p class="first last">One-character label for current dynamical state: either “E” or “I” for extrapolation or interpolation, respectively.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.advance_verlet" title="quippy.lotf.LOTFDynamics.advance_verlet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">advance_verlet</span></code></a>(f)</td>
<td>Single advance using velocity Verlet with forces <cite>f</cite></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.fit_forces" title="quippy.lotf.LOTFDynamics.fit_forces"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fit_forces</span></code></a>(atoms)</td>
<td>Evaluate QM forces and optimise the adjustable potential to reproduce them</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.get_extrapolation_forces" title="quippy.lotf.LOTFDynamics.get_extrapolation_forces"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_extrapolation_forces</span></code></a>(atoms,&nbsp;i)</td>
<td>Get LOTF forces at extrapolation step <cite>i</cite></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.get_interpolation_forces" title="quippy.lotf.LOTFDynamics.get_interpolation_forces"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_interpolation_forces</span></code></a>(atoms,&nbsp;i)</td>
<td>Get LOTF forces at interpolation step <cite>i</cite></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.get_reference_forces" title="quippy.lotf.LOTFDynamics.get_reference_forces"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_reference_forces</span></code></a>(atoms,&nbsp;i)</td>
<td>Do a reference QM calculation and return forces resulting from standard force mixing.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.get_state" title="quippy.lotf.LOTFDynamics.get_state"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_state</span></code></a>()</td>
<td>Save dynamical state, including random number seeds</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.initialise_adjustable_potential" title="quippy.lotf.LOTFDynamics.initialise_adjustable_potential"><code class="xref py py-obj docutils literal notranslate"><span class="pre">initialise_adjustable_potential</span></code></a>(atoms)</td>
<td>Bootstrap the potential by doing a QM calculation and fitting the adj.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.set_qm_update_func" title="quippy.lotf.LOTFDynamics.set_qm_update_func"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_qm_update_func</span></code></a>(qm_update_func)</td>
<td>Specify a function that will be called up update the QM region</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.set_state" title="quippy.lotf.LOTFDynamics.set_state"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_state</span></code></a>(saved_state)</td>
<td>Restore dynamics to a previously saved state.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.lotf.LOTFDynamics.step" title="quippy.lotf.LOTFDynamics.step"><code class="xref py py-obj docutils literal notranslate"><span class="pre">step</span></code></a>()</td>
<td>Advance the dynamics by one LOTF cycle</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.advance_verlet">
<code class="descname">advance_verlet</code><span class="sig-paren">(</span><em>f</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.advance_verlet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.advance_verlet" title="Permalink to this definition">¶</a></dt>
<dd><p>Single advance using velocity Verlet with forces <cite>f</cite></p>
<p>Do not call this method directly: it is invoked by <a class="reference internal" href="#quippy.lotf.LOTFDynamics.step" title="quippy.lotf.LOTFDynamics.step"><code class="xref py py-meth docutils literal notranslate"><span class="pre">step()</span></code></a>
once for each extrapolation and interpolation step.</p>
<p>Note that order of the two half-steps is inverted, to fit in
with the predictor-corrector loops. This means the momenta
are half-stepped outside of this routine.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.fit_forces">
<code class="descname">fit_forces</code><span class="sig-paren">(</span><em>atoms</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.fit_forces"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.fit_forces" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluate QM forces and optimise the adjustable potential to reproduce them</p>
<p>Returns the QM forces on the atoms at the fit point</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.get_extrapolation_forces">
<code class="descname">get_extrapolation_forces</code><span class="sig-paren">(</span><em>atoms</em>, <em>i</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.get_extrapolation_forces"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.get_extrapolation_forces" title="Permalink to this definition">¶</a></dt>
<dd><p>Get LOTF forces at extrapolation step <cite>i</cite></p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.get_interpolation_forces">
<code class="descname">get_interpolation_forces</code><span class="sig-paren">(</span><em>atoms</em>, <em>i</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.get_interpolation_forces"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.get_interpolation_forces" title="Permalink to this definition">¶</a></dt>
<dd><p>Get LOTF forces at interpolation step <cite>i</cite></p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.get_number_of_steps">
<code class="descname">get_number_of_steps</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.get_number_of_steps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.get_number_of_steps" title="Permalink to this definition">¶</a></dt>
<dd><p>Return number of steps taken since start of dynamics</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.get_reference_forces">
<code class="descname">get_reference_forces</code><span class="sig-paren">(</span><em>atoms</em>, <em>i</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.get_reference_forces"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.get_reference_forces" title="Permalink to this definition">¶</a></dt>
<dd><p>Do a reference QM calculation and return forces resulting from standard force mixing.</p>
<p>Useful for checking errors during predictor/corrector extrapolation and interpolation.
Does not change the current set of adjustable potential parameters.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.get_state">
<code class="descname">get_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.get_state"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.get_state" title="Permalink to this definition">¶</a></dt>
<dd><p>Save dynamical state, including random number seeds</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.get_time">
<code class="descname">get_time</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.get_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.get_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Return current time (in ASE time units)</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.initialise_adjustable_potential">
<code class="descname">initialise_adjustable_potential</code><span class="sig-paren">(</span><em>atoms</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.initialise_adjustable_potential"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.initialise_adjustable_potential" title="Permalink to this definition">¶</a></dt>
<dd><p>Bootstrap the potential by doing a QM calculation and fitting the adj. pot.</p>
<p>Returns the initial QM/MM forces on the atoms</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>steps</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Run LOTF dynamics forwards for given number of small time steps</p>
<p>Number of LOTF cycles is given by <code class="docutils literal notranslate"><span class="pre">step/extrapolate_steps</span></code>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.set_qm_update_func">
<code class="descname">set_qm_update_func</code><span class="sig-paren">(</span><em>qm_update_func</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.set_qm_update_func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.set_qm_update_func" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify a function that will be called up update the QM region</p>
<p><cite>qm_update_func</cite> should take a single argument, which is the
<a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object representing the current state of the
dynamical system.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.set_state">
<code class="descname">set_state</code><span class="sig-paren">(</span><em>saved_state</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.set_state"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.set_state" title="Permalink to this definition">¶</a></dt>
<dd><p>Restore dynamics to a previously saved state.
Sets arrays directly, ignoring any constraints.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.lotf.LOTFDynamics.step">
<code class="descname">step</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#LOTFDynamics.step"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.LOTFDynamics.step" title="Permalink to this definition">¶</a></dt>
<dd><p>Advance the dynamics by one LOTF cycle</p>
<p>The <em>Learn on the Fly</em> algorithm proceeds as follows:</p>
<blockquote>
<div><ol class="arabic simple">
<li><strong>QM selection</strong> using the function registered
with the <a class="reference internal" href="#quippy.lotf.LOTFDynamics.set_qm_update_func" title="quippy.lotf.LOTFDynamics.set_qm_update_func"><code class="xref py py-meth docutils literal notranslate"><span class="pre">set_qm_update_func()</span></code></a> method.</li>
<li><strong>Save state</strong> of the dynamical system using the
<a class="reference internal" href="#quippy.lotf.LOTFDynamics.get_state" title="quippy.lotf.LOTFDynamics.get_state"><code class="xref py py-meth docutils literal notranslate"><span class="pre">get_state()</span></code></a> method.</li>
<li><strong>Extrapolation</strong> of the dynamics with fixed parameters for
<a class="reference internal" href="#quippy.lotf.LOTFDynamics.extrapolate_steps" title="quippy.lotf.LOTFDynamics.extrapolate_steps"><code class="xref py py-attr docutils literal notranslate"><span class="pre">extrapolate_steps</span></code></a>, each of size <code class="xref py py-attr docutils literal notranslate"><span class="pre">dt</span></code>.
This is the <em>predictor</em> part of the predictor-corrector cycle.
The adjustable potential parameters are remapped if
the set of QM atoms has changed since the most recent fit.</li>
<li><strong>QM force calculation</strong> and <strong>optimisation</strong> of the adjustable
potential parameters to reproduce the QM forces at the fit point.
With the linear ‘spings’ method, the fit can be reposed as a linear
algebra problem and solved via singular value decomposition (SVD).
See the adjustable potential code for full details in
<a href="#id1"><span class="problematic" id="id2">:svn:`QUIP_Core/AdjustablePotential.f95`</span></a>.</li>
<li><strong>Restore state</strong> of the dynamical system saved at step 2,
returning to before the extrapolation phase.</li>
<li><strong>Interpolation</strong> of the dynamics, with the adjustable potential
parameters interpolated between their values at the two fit points.</li>
</ol>
</div></blockquote>
</dd></dl>

<dl class="attribute">
<dt id="quippy.lotf.LOTFDynamics.extrapolate_steps">
<code class="descname">extrapolate_steps</code><a class="headerlink" href="#quippy.lotf.LOTFDynamics.extrapolate_steps" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of small time-steps used when extrapolating
or interpolating in the LOTF predictor-corrector loop.
See <a class="reference internal" href="#quippy.lotf.LOTFDynamics.step" title="quippy.lotf.LOTFDynamics.step"><code class="xref py py-meth docutils literal notranslate"><span class="pre">step()</span></code></a> for a more detailed description.</p>
</dd></dl>

<dl class="attribute">
<dt id="quippy.lotf.LOTFDynamics.state_label">
<code class="descname">state_label</code><a class="headerlink" href="#quippy.lotf.LOTFDynamics.state_label" title="Permalink to this definition">¶</a></dt>
<dd><p>One-character label for current dynamical state: either “E” or “I”
for extrapolation or interpolation, respectively.</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="quippy.lotf.update_hysteretic_qm_region">
<code class="descclassname">quippy.lotf.</code><code class="descname">update_hysteretic_qm_region</code><span class="sig-paren">(</span><em>atoms</em>, <em>old_qm_list</em>, <em>qm_centre</em>, <em>qm_inner_radius</em>, <em>qm_outer_radius</em>, <em>use_avgpos=False</em>, <em>update_marks=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#update_hysteretic_qm_region"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.update_hysteretic_qm_region" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the QM region in <cite>atoms</cite></p>
<p>Calls <a class="reference internal" href="potential.html#quippy.potential.ForceMixingPotential.set_qm_atoms" title="quippy.potential.ForceMixingPotential.set_qm_atoms"><code class="xref py py-meth docutils literal notranslate"><span class="pre">set_qm_atoms()</span></code></a> to mark the atoms
if the Atoms’ calculator is an instance of <a class="reference internal" href="potential.html#quippy.potential.ForceMixingPotential" title="quippy.potential.ForceMixingPotential"><code class="xref py py-class docutils literal notranslate"><span class="pre">ForceMixingPotential</span></code></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>old_qm_list</strong> <span class="classifier-delimiter">:</span> <span class="classifier">list</span></dt>
<dd><p class="first last">List of QM atoms at previous update</p>
</dd>
<dt><strong>qm_centre</strong> <span class="classifier-delimiter">:</span> <span class="classifier">array with shape (3,)</span></dt>
<dd><p class="first last">Position of the new centre of the QM region</p>
</dd>
<dt><strong>qm_inner_radius</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd><p class="first last">Atoms which come within this distance of any core atom will become
selected for QM treatment.</p>
</dd>
<dt><strong>qm_outer_radius</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd><p class="first last">Atoms stay QM until they are more than this distance from any core atom</p>
</dd>
<dt><strong>update_marks</strong> <span class="classifier-delimiter">:</span> <span class="classifier">bool</span></dt>
<dd><p class="first last">If true (default), call <a class="reference internal" href="potential.html#quippy.potential.ForceMixingPotential.set_qm_atoms" title="quippy.potential.ForceMixingPotential.set_qm_atoms"><code class="xref py py-meth docutils literal notranslate"><span class="pre">set_qm_atoms()</span></code></a> to mark the atoms</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>qm_list</strong> <span class="classifier-delimiter">:</span> <span class="classifier">list</span></dt>
<dd><p class="first last">List of the new QM atom indices</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="quippy.lotf.iter_atom_centered_clusters">
<code class="descclassname">quippy.lotf.</code><code class="descname">iter_atom_centered_clusters</code><span class="sig-paren">(</span><em>at</em>, <em>mark_name='hybrid_mark'</em>, <em>**cluster_args</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/lotf.html#iter_atom_centered_clusters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.lotf.iter_atom_centered_clusters" title="Permalink to this definition">¶</a></dt>
<dd><p>Iterate over all atom-centered (little) clusters in <cite>at</cite>.</p>
<p>If <cite>at</cite> has a property with name <cite>mark_name</cite> (default <cite>“hybrid_mark”</cite>),
only those atoms where <code class="docutils literal notranslate"><span class="pre">hybrid_mark</span> <span class="pre">==</span> <span class="pre">HYBRID_ACTIVE_MARK</span></code> are
included. Otherwise, all atoms are included.</p>
<p>Clusters are constructed by calling
<a class="reference internal" href="clusters.html#quippy.clusters.create_hybrid_weights" title="quippy.clusters.create_hybrid_weights"><code class="xref py py-func docutils literal notranslate"><span class="pre">create_hybrid_weights()</span></code></a> and
<a class="reference internal" href="clusters.html#quippy.clusters.create_cluster_simple" title="quippy.clusters.create_cluster_simple"><code class="xref py py-func docutils literal notranslate"><span class="pre">create_cluster_simple()</span></code></a> once for each atom
of interest, after setting <code class="docutils literal notranslate"><span class="pre">hybrid_mark=HYBRID_ACTIVE_MARK</span></code> for that
atom only.</p>
<p>Any keyword arguments given are passed along to both cluster
creation functions.</p>
</dd></dl>

<span class="target" id="module-quippy.adjustablepotential"></span><p>Module contents for <a class="reference internal" href="#module-quippy.adjustablepotential" title="quippy.adjustablepotential: `Learn on the Fly` adjustable potential"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quippy.adjustablepotential</span></code></a>:</p>
<p class="rubric">Functions</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.adjustablepotential.adjustable_potential_init" title="quippy.adjustablepotential.adjustable_potential_init"><code class="xref py py-obj docutils literal notranslate"><span class="pre">adjustable_potential_init</span></code></a>(…)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.adjustablepotential.adjustable_potential_force" title="quippy.adjustablepotential.adjustable_potential_force"><code class="xref py py-obj docutils literal notranslate"><span class="pre">adjustable_potential_force</span></code></a>(…)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.adjustablepotential.adjustable_potential_finalise" title="quippy.adjustablepotential.adjustable_potential_finalise"><code class="xref py py-obj docutils literal notranslate"><span class="pre">adjustable_potential_finalise</span></code></a>()</td>
<td><p class="rubric">References</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Attributes</p>
<table border="1" class="docutils">
<colgroup>
<col width="91%" />
<col width="9%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Value</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">AP_bad_atom_threshold</span></code></td>
<td>0.1</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">adjustable_potential_max_spring_constant</span></code></td>
<td>1.0</td>
</tr>
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">adjustable_potential_nparams</span></code></td>
<td>1</td>
</tr>
</tbody>
</table>
<dl class="function">
<dt id="quippy.adjustablepotential.adjustable_potential_init">
<code class="descclassname">quippy.adjustablepotential.</code><code class="descname">adjustable_potential_init</code><span class="sig-paren">(</span><em>atoms_in</em>, <em>fitlist</em>, <em>directionn</em><span class="optional">[</span>, <em>spring_hops</em>, <em>map</em>, <em>method</em>, <em>nnonly</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.adjustablepotential.adjustable_potential_init" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>atoms_in</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>fitlist</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="table.html#quippy.table.Table" title="quippy.table.Table"><code class="xref py py-class docutils literal notranslate"><span class="pre">Table</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>directionn</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>spring_hops</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>map</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>method</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1), optional</span></dt>
<dd></dd>
<dt><strong>nnonly</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">adjustable_potential_init</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Potentials/AdjustablePotential.f95">src/Potentials/AdjustablePotential.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.adjustablepotential.adjustable_potential_force">
<code class="descclassname">quippy.adjustablepotential.</code><code class="descname">adjustable_potential_force</code><span class="sig-paren">(</span><em>atoms_in</em>, <em>n0</em><span class="optional">[</span>, <em>interp</em>, <em>interp_space</em>, <em>interp_order</em>, <em>energy</em>, <em>power</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.adjustablepotential.adjustable_potential_force" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>atoms_in</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>n0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd><p class="first last">shape(qp_force,0)</p>
</dd>
<dt><strong>interp</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>interp_space</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>interp_order</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1), optional</span></dt>
<dd></dd>
<dt><strong>energy</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(float,’d’), optional</span></dt>
<dd></dd>
<dt><strong>power</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(float,’d’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>force</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-2 array(‘d’) with bounds (3,qp_n0)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">adjustable_potential_force</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Potentials/AdjustablePotential.f95">src/Potentials/AdjustablePotential.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.adjustablepotential.adjustable_potential_finalise">
<code class="descclassname">quippy.adjustablepotential.</code><code class="descname">adjustable_potential_finalise</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.adjustablepotential.adjustable_potential_finalise" title="Permalink to this definition">¶</a></dt>
<dd><p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">adjustable_potential_finalise</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Potentials/AdjustablePotential.f95">src/Potentials/AdjustablePotential.f95</a>.</p>
</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2008-2016, James Kermode

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>